using System;
using System.Runtime.Serialization;
using Framework.Domain;

namespace Framework.Core
{
    public class WorkItemException : ApplicationException
    {
        public WorkItemException(string workItemName, CaseId caseId, Exception exception)
            : base(string.Format("Failed to execute {0} on case {1}", workItemName, caseId), exception)
        {
        }

        public WorkItemException(string message) : base(message) { }

        public WorkItemException(string message, Exception innerException) : base(message, innerException) { }

        protected WorkItemException(SerializationInfo info, StreamingContext context) : base(info, context) { }
    }
}